package com.ymatou.iapi.godmch.testcase;

import java.util.ArrayList;
import java.util.List;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.ymatou.iapi.dguser.parameter.UserCreateBean;
import com.ymatou.iapi.godmch.parameter.createmchBean;
import com.ymatou.iapi.godmch.parameter.editmchBean;
import com.ymatou.iapi.godmch.parameter.getMchListByIdListBean;
import com.ymatou.iapi.godmch.service.getMchListByIdListCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.*;
import com.ymt.utils.tag.*;
import com.ymttest.business.service.DGUserCallService;
import com.ymttest.business.service.shenqi.GodmchManageCallService;
import com.ymttest.database.model.country_info;
import com.ymttest.database.model.mch_info;
import com.ymttest.database.sqlwapper.godmch.country_infoWapper;
import com.ymttest.database.sqlwapper.godmch.mch_infoWapper;
/**
*商户id批量查询商户信息
*FreeMaker Template自动生成代码
*/
@TestSuite
public class Ts_getMchListByIdList{
	private static getMchListByIdListBean bean;
	private static getMchListByIdListCall call;
	private static mch_infoWapper mchinfoWapper=new mch_infoWapper();
	private static country_infoWapper countryinfoWapper=new country_infoWapper();
	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("商户id批量查询商户信息");
	}

	@Before
	public void caseUp() {
		bean=new getMchListByIdListBean();
		call=new getMchListByIdListCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(call.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}
	/**
	 * 集合转化为字符串
	 * @param mchIdList
	 * @return
	 * @throws InterruptedException 
	 */
	private void check_verify(List<Integer> mchIdList) throws InterruptedException
	{
		List<mch_info> mchInfos=mchinfoWapper.selectbyMchIds(bean.getMchIdList());
		Logger.verifyEquals("200", call.getStatus1(), "验证返回成功status值");
        Logger.verifyEquals("请求成功", call.getMessage(), "验证返回成功Message值");

        for(int i=0;i<call.getmchInfoList().size();i++){
        	Logger.comment("商户Id:"+mchInfos.get(i).getMchId());
        	JsonObject obj=call.getmchInfoList().get(i).getAsJsonObject();
        	Logger.verifyEquals( obj.get("agent").getAsBoolean(),mchInfos.get(i).getAgent()==1?true:false, "验证商户id="+mchInfos.get(i).getMchId()+"的agent字段");
        	Logger.verifyEquals( obj.get("channel").getAsBoolean(),mchInfos.get(i).getChannels()==1?true:false, "验证商户id="+mchInfos.get(i).getMchId()+"的channel字段");
        	Logger.verifyEquals( obj.get("vip").getAsBoolean(),mchInfos.get(i).getVip()==1?true:false, "验证商户id="+mchInfos.get(i).getMchId()+"的vip字段");
        	
        	Logger.verifyEquals( obj.get("seqId").getAsInt(),mchInfos.get(i).getSeqId(), "验证商户id="+mchInfos.get(i).getMchId()+"的SeqId字段");
        	Logger.verifyEquals( obj.get("mchId").getAsInt(),mchInfos.get(i).getMchId(), "验证mchId字段");
        	Logger.verifyEquals( obj.get("mchTitle").getAsString(),mchInfos.get(i).getMchTitle().isEmpty()?mchInfos.get(i).getNickName():mchInfos.get(i).getMchTitle(), "验证商户id="+mchInfos.get(i).getMchId()+"的MchTitle字段");
        	Logger.verifyEquals( obj.get("avatar").getAsString(),mchInfos.get(i).getAvatar(), "验证商户id="+mchInfos.get(i).getMchId()+"的Avatar字段");
        	Logger.verifyEquals( obj.get("currency").getAsString(),mchInfos.get(i).getCurrency(), "验证商户id="+mchInfos.get(i).getMchId()+"的Currency字段");
        	Logger.verifyEquals( obj.get("country").getAsString(),mchInfos.get(i).getCountry(), "验证商户id="+mchInfos.get(i).getMchId()+"的country字段");
        	
        	//查询国家 验证supportLocalCurrency
        	country_info cinfo=countryinfoWapper.selectByPrimaryKey(mchInfos.get(i).getCountry());
        	Logger.verifyEquals( obj.get("supportLocalCurrency").getAsBoolean(),cinfo.getSupportLocalCurrency()==0?true:false, "验证商户id="+mchInfos.get(i).getMchId()+"的SupportLocalCurrency字段");
        	
        }
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_getMchListByIdList_001() {
		Logger.start(true,"正例-商户id批量查询商户信息-mchIdList数量大于1");
		try {
			//渠道1
			UserCreateBean usercreateBean1=DGUserCallService.initSellerUsercreateBean();
			int userId_channl1=DGUserCallService.UserCreateCall(usercreateBean1);
			//渠道2
			UserCreateBean usercreateBean2=DGUserCallService.initSellerUsercreateBean();
			int userId_channl2=DGUserCallService.UserCreateCall(usercreateBean2);
			//创建
			createmchBean createmchbean1=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl1);
			GodmchManageCallService.createmchCallForChannel(createmchbean1);
			editmchBean editmchbean1 = GodmchManageCallService.IniteditmachBean(userId_channl1);
			GodmchManageCallService.editmachCall(editmchbean1);
			
			createmchBean createmchbean2=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl2);
			GodmchManageCallService.createmchCallForChannel(createmchbean2);
			editmchBean editmchbean2 = GodmchManageCallService.IniteditmachBean(userId_channl2);
			GodmchManageCallService.editmachCall(editmchbean2);
			
			List<Integer> mchIdList=new ArrayList();
			mchIdList.add(userId_channl1);
			mchIdList.add(userId_channl2);
			bean.setMchIdList(mchIdList);
			call.setData(bean);
			call.callService();			
			
			check_verify(bean.getMchIdList());
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_getMchListByIdList_002() {
		Logger.start(true,"正例-商户id批量查询商户信息-mchIdList数量等于1");
		try {
			//渠道1
			UserCreateBean usercreateBean1=DGUserCallService.initSellerUsercreateBean();
			int userId_channl1=DGUserCallService.UserCreateCall(usercreateBean1);
			//创建
			createmchBean createmchbean1=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl1);
			GodmchManageCallService.createmchCallForChannel(createmchbean1);
			editmchBean editmchbean1 = GodmchManageCallService.IniteditmachBean(userId_channl1);
			GodmchManageCallService.editmachCall(editmchbean1);
			
			List<Integer> mchIdList=new ArrayList();
			mchIdList.add(userId_channl1);
			bean.setMchIdList(mchIdList);
			call.setData(bean);
			call.callService();			
			
			check_verify(bean.getMchIdList());		
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_getMchListByIdList_003() {
		Logger.start(true,"正例-商户id批量查询商户信息-mchIdList数量等于0");
		try {
			List<Integer> mchIdList=new ArrayList();
			bean.setMchIdList(mchIdList);
			call.setData(bean);
			call.callService();			
			
			Logger.verifyEquals("4001", call.getStatus1(), "验证返回参数异常的status值");	
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_getMchListByIdList_003_1() {
		Logger.start(true,"正例-商户id批量查询商户信息-mchTitle为空，显示昵称nicName");
		try {
			//渠道
			UserCreateBean usercreateBean1=DGUserCallService.initSellerUsercreateBean();
			int userId_channl=DGUserCallService.UserCreateCall(usercreateBean1);
			createmchBean createmchbean=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl);
			GodmchManageCallService.createmchCallForChannel(createmchbean);
//			editmchBean editmchbean = GodmchManageCallService.IniteditmachBean(userId_channl);
//			GodmchManageCallService.editmachCall(editmchbean);
			
			List<Integer> mchIdList=new ArrayList();
			mchIdList.add(userId_channl);
			bean.setMchIdList(mchIdList);
			call.setData(bean);
			call.callService();			
			
			check_verify(bean.getMchIdList());	
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_getMchListByIdList_004() {
		Logger.start(true,"正例-商户id批量查询商户信息-mchIdList数量等于1并且商户id不存在");
		try {
			List<Integer> mchIdList=new ArrayList();
			mchIdList.add(9999);
			bean.setMchIdList(mchIdList);
			call.setData(bean);
			call.callService();				
			
			Logger.verifyEquals("200", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals("请求成功", call.getMessage(), "验证返回成功Message值");
	        Logger.verifyEquals(0, call.getmchInfoList().size(), "验证返回的mchInfoList为空");
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_getMchListByIdList_005() {
		Logger.start(true,"正例-商户id批量查询商户信息-mchIdList数量大于1并且含有不存在的商户id");
		try {
			//渠道1
			UserCreateBean usercreateBean1=DGUserCallService.initSellerUsercreateBean();
			int userId_channl1=DGUserCallService.UserCreateCall(usercreateBean1);
			//创建
			createmchBean createmchbean1=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl1);
			GodmchManageCallService.createmchCallForChannel(createmchbean1);
			editmchBean editmchbean1 = GodmchManageCallService.IniteditmachBean(userId_channl1);
			GodmchManageCallService.editmachCall(editmchbean1);
			
			List<Integer> mchIdList=new ArrayList();
			mchIdList.add(userId_channl1);
			mchIdList.add(999);
			bean.setMchIdList(mchIdList);
			call.setData(bean);
			call.callService();			
			
			check_verify(bean.getMchIdList());	

			Logger.verifyEquals(1, call.getmchInfoList().size(), "验证返回的mchInfoList长度=1");
			Logger.verifyEquals(bean.getMchIdList().get(0), call.getmchInfoList().get(0).getAsJsonObject().get("mchId").getAsInt(), "验证返回的mchId 等于 传入");
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_getMchListByIdList_006() {
		Logger.start(true,"正例-商户id批量查询商户信息-mchIdList集合中都是普通代理");
		try {
			//渠道1
			UserCreateBean usercreateBean1=DGUserCallService.initSellerUsercreateBean();//初始化创建用户 为什么手机号没有值
			int userId_channl=DGUserCallService.UserCreateCall(usercreateBean1);
			//代理1
			usercreateBean1=DGUserCallService.initSellerUsercreateBean();
			int userId_agent=DGUserCallService.UserCreateCall(usercreateBean1);
			createmchBean createmchbean=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl);
			GodmchManageCallService.createmchCallForChannel(createmchbean);
			//创建代理1
			List<createmchBean> createmchList=GodmchManageCallService.InitcreatemchBeanForAgent(userId_channl, userId_agent);
			createmchList.get(0).setCountry("CHN");
			GodmchManageCallService.createmchCallForAgent(createmchList.toArray(new
					createmchBean[createmchList.size()]));
			
			
			//渠道2
			UserCreateBean usercreateBean2=DGUserCallService.initSellerUsercreateBean();//初始化创建用户 为什么手机号没有值
			int userId_channl2=DGUserCallService.UserCreateCall(usercreateBean1);
			//代理2
			usercreateBean2=DGUserCallService.initSellerUsercreateBean();
			int userId_agent2=DGUserCallService.UserCreateCall(usercreateBean2);
			createmchBean createmchbean2=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl2);
			GodmchManageCallService.createmchCallForChannel(createmchbean2);
			//创建代理2
			List<createmchBean> createmchList2=GodmchManageCallService.InitcreatemchBeanForAgent(userId_channl2, userId_agent2);
			createmchList2.get(0).setCountry("CHN");
			GodmchManageCallService.createmchCallForAgent(createmchList2.toArray(new
					createmchBean[createmchList2.size()]));
			
			List<Integer> mchIdList=new ArrayList();
			mchIdList.add(userId_agent);
			mchIdList.add(userId_agent2);
			bean.setMchIdList(mchIdList);
			call.setData(bean);
			call.callService();			
			check_verify(bean.getMchIdList());	
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_getMchListByIdList_007() {
		Logger.start(true,"正例-商户id批量查询商户信息-mchIdList集合中都是vip代理");
		try {
			//渠道1
			UserCreateBean usercreateBean1=DGUserCallService.initSellerUsercreateBean();
			int userId_channl=DGUserCallService.UserCreateCall(usercreateBean1);
			//代理1
			usercreateBean1=DGUserCallService.initSellerUsercreateBean();
			int userId_agent=DGUserCallService.UserCreateCall(usercreateBean1);
			createmchBean createmchbean=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl);
			GodmchManageCallService.createmchCallForChannel(createmchbean);
			//设置vip
			GodmchManageCallService.SetVip(userId_channl);
			//创建代理1
			List<createmchBean> createmchList=GodmchManageCallService.InitcreatemchBeanForAgent(userId_channl, userId_agent);
			GodmchManageCallService.createmchCallForAgent(createmchList.toArray(new
					createmchBean[createmchList.size()]));

			//渠道2
			UserCreateBean usercreateBean2=DGUserCallService.initSellerUsercreateBean();//初始化创建用户 为什么手机号没有值
			int userId_channl2=DGUserCallService.UserCreateCall(usercreateBean2);
			//代理2
			usercreateBean2=DGUserCallService.initSellerUsercreateBean();
			int userId_agent2=DGUserCallService.UserCreateCall(usercreateBean2);
			createmchBean createmchbean2=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl2);
			GodmchManageCallService.createmchCallForChannel(createmchbean2);
			//设置vip
			GodmchManageCallService.SetVip(userId_channl2);
			//创建代理2
			List<createmchBean> createmchList2=GodmchManageCallService.InitcreatemchBeanForAgent(userId_channl2, userId_agent2);
			GodmchManageCallService.createmchCallForAgent(createmchList2.toArray(new
					createmchBean[createmchList2.size()]));
			
			List<Integer> mchIdList=new ArrayList();
			mchIdList.add(userId_agent);
			mchIdList.add(userId_agent2);
			bean.setMchIdList(mchIdList);
			call.setData(bean);
			call.callService();			
			check_verify(bean.getMchIdList());		
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_getMchListByIdList_008() {
		Logger.start(true,"正例-商户id批量查询商户信息-mchIdList集合中都是普通渠道");
		try {
			//渠道1
			UserCreateBean usercreateBean1=DGUserCallService.initSellerUsercreateBean();
			int userId_channl1=DGUserCallService.UserCreateCall(usercreateBean1);
			//渠道2
			UserCreateBean usercreateBean2=DGUserCallService.initSellerUsercreateBean();
			int userId_channl2=DGUserCallService.UserCreateCall(usercreateBean2);
			//创建
			createmchBean createmchbean1=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl1);
			GodmchManageCallService.createmchCallForChannel(createmchbean1);
			editmchBean editmchbean1 = GodmchManageCallService.IniteditmachBean(userId_channl1);
			GodmchManageCallService.editmachCall(editmchbean1);
			
			createmchBean createmchbean2=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl2);
			GodmchManageCallService.createmchCallForChannel(createmchbean2);
			editmchBean editmchbean2 = GodmchManageCallService.IniteditmachBean(userId_channl2);
			GodmchManageCallService.editmachCall(editmchbean2);
			
			List<Integer> mchIdList=new ArrayList();
			mchIdList.add(userId_channl1);
			mchIdList.add(userId_channl2);
			bean.setMchIdList(mchIdList);
			call.setData(bean);
			call.callService();			
			
			check_verify(bean.getMchIdList());	
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_getMchListByIdList_009() {
		Logger.start(true,"正例-商户id批量查询商户信息-mchIdList集合中都是vip渠道");
		try {
			//渠道1
			UserCreateBean usercreateBean1=DGUserCallService.initSellerUsercreateBean();
			int userId_channl=DGUserCallService.UserCreateCall(usercreateBean1);
			createmchBean createmchbean=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl);
			GodmchManageCallService.createmchCallForChannel(createmchbean);
			//设置vip
			GodmchManageCallService.SetVip(userId_channl);

			//渠道2
			UserCreateBean usercreateBean2=DGUserCallService.initSellerUsercreateBean();//初始化创建用户 为什么手机号没有值
			int userId_channl2=DGUserCallService.UserCreateCall(usercreateBean2);
			createmchBean createmchbean2=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl2);
			GodmchManageCallService.createmchCallForChannel(createmchbean2);
			//设置vip
			GodmchManageCallService.SetVip(userId_channl2);
			
			List<Integer> mchIdList=new ArrayList();
			mchIdList.add(userId_channl);
			mchIdList.add(userId_channl2);
			bean.setMchIdList(mchIdList);
			call.setData(bean);
			call.callService();			
			check_verify(bean.getMchIdList());		
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_getMchListByIdList_010() {
		Logger.start(true,"正例-商户id批量查询商户信息-mchIdList集合中含有普通代理和vip代理混合");
		try {
			//渠道1
			UserCreateBean usercreateBean1=DGUserCallService.initSellerUsercreateBean();
			int userId_channl=DGUserCallService.UserCreateCall(usercreateBean1);
			//代理1
			usercreateBean1=DGUserCallService.initSellerUsercreateBean();
			int userId_agent=DGUserCallService.UserCreateCall(usercreateBean1);
			createmchBean createmchbean=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl);
			GodmchManageCallService.createmchCallForChannel(createmchbean);
			//创建代理1
			List<createmchBean> createmchList=GodmchManageCallService.InitcreatemchBeanForAgent(userId_channl, userId_agent);
			GodmchManageCallService.createmchCallForAgent(createmchList.toArray(new
					createmchBean[createmchList.size()]));

			//渠道2
			UserCreateBean usercreateBean2=DGUserCallService.initSellerUsercreateBean();//初始化创建用户 为什么手机号没有值
			int userId_channl2=DGUserCallService.UserCreateCall(usercreateBean2);
			//代理2
			usercreateBean2=DGUserCallService.initSellerUsercreateBean();
			int userId_agent2=DGUserCallService.UserCreateCall(usercreateBean2);
			createmchBean createmchbean2=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl2);
			GodmchManageCallService.createmchCallForChannel(createmchbean2);
			//设置vip
			GodmchManageCallService.SetVip(userId_channl2);
			//创建代理2
			List<createmchBean> createmchList2=GodmchManageCallService.InitcreatemchBeanForAgent(userId_channl2, userId_agent2);
			GodmchManageCallService.createmchCallForAgent(createmchList2.toArray(new
					createmchBean[createmchList2.size()]));
			
			List<Integer> mchIdList=new ArrayList();
			mchIdList.add(userId_agent);
			mchIdList.add(userId_agent2);
			bean.setMchIdList(mchIdList);
			call.setData(bean);
			call.callService();			
			check_verify(bean.getMchIdList());			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_getMchListByIdList_011() {
		Logger.start(true,"正例-商户id批量查询商户信息-mchIdList集合中含有普通代理和普通渠道混合");
		try {
			//渠道1
			UserCreateBean usercreateBean1=DGUserCallService.initSellerUsercreateBean();
			int userId_channl=DGUserCallService.UserCreateCall(usercreateBean1);
			//代理1
			usercreateBean1=DGUserCallService.initSellerUsercreateBean();
			int userId_agent=DGUserCallService.UserCreateCall(usercreateBean1);
			createmchBean createmchbean=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl);
			GodmchManageCallService.createmchCallForChannel(createmchbean);
			//创建代理1
			List<createmchBean> createmchList=GodmchManageCallService.InitcreatemchBeanForAgent(userId_channl, userId_agent);
			GodmchManageCallService.createmchCallForAgent(createmchList.toArray(new
					createmchBean[createmchList.size()]));

			//渠道2
			UserCreateBean usercreateBean2=DGUserCallService.initSellerUsercreateBean();//初始化创建用户 为什么手机号没有值
			int userId_channl2=DGUserCallService.UserCreateCall(usercreateBean2);
			createmchBean createmchbean2=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl2);
			GodmchManageCallService.createmchCallForChannel(createmchbean2);
			
			List<Integer> mchIdList=new ArrayList();
			mchIdList.add(userId_agent);
			mchIdList.add(userId_channl2);
			bean.setMchIdList(mchIdList);
			call.setData(bean);
			call.callService();			
			check_verify(bean.getMchIdList());		
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_getMchListByIdList_012() {
		Logger.start(true,"正例-商户id批量查询商户信息-mchIdList集合中含有vip代理和vip渠道混合");
		try {
			//渠道1
			UserCreateBean usercreateBean1=DGUserCallService.initSellerUsercreateBean();
			int userId_channl=DGUserCallService.UserCreateCall(usercreateBean1);
			//代理1
			usercreateBean1=DGUserCallService.initSellerUsercreateBean();
			int userId_agent=DGUserCallService.UserCreateCall(usercreateBean1);
			createmchBean createmchbean=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl);
			GodmchManageCallService.createmchCallForChannel(createmchbean);
			//设置vip
			GodmchManageCallService.SetVip(userId_channl);
			//创建代理1
			List<createmchBean> createmchList=GodmchManageCallService.InitcreatemchBeanForAgent(userId_channl, userId_agent);
			GodmchManageCallService.createmchCallForAgent(createmchList.toArray(new
					createmchBean[createmchList.size()]));

			//渠道2
			UserCreateBean usercreateBean2=DGUserCallService.initSellerUsercreateBean();//初始化创建用户 为什么手机号没有值
			int userId_channl2=DGUserCallService.UserCreateCall(usercreateBean2);
			createmchBean createmchbean2=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl2);
			GodmchManageCallService.createmchCallForChannel(createmchbean2);
			//设置vip
			GodmchManageCallService.SetVip(userId_channl2);
		
			
			List<Integer> mchIdList=new ArrayList();
			mchIdList.add(userId_agent);
			mchIdList.add(userId_channl2);
			bean.setMchIdList(mchIdList);
			call.setData(bean);
			call.callService();			
			check_verify(bean.getMchIdList());		
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_getMchListByIdList_013() {
		Logger.start(true,"正例-商户id批量查询商户信息-mchIdList集合中含有普通代理和vip渠道混合");
		try {
			//渠道1
			UserCreateBean usercreateBean1=DGUserCallService.initSellerUsercreateBean();
			int userId_channl=DGUserCallService.UserCreateCall(usercreateBean1);
			//代理1
			usercreateBean1=DGUserCallService.initSellerUsercreateBean();
			int userId_agent=DGUserCallService.UserCreateCall(usercreateBean1);
			createmchBean createmchbean=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl);
			GodmchManageCallService.createmchCallForChannel(createmchbean);
			//创建代理1
			List<createmchBean> createmchList=GodmchManageCallService.InitcreatemchBeanForAgent(userId_channl, userId_agent);
			GodmchManageCallService.createmchCallForAgent(createmchList.toArray(new
					createmchBean[createmchList.size()]));

			//渠道2
			UserCreateBean usercreateBean2=DGUserCallService.initSellerUsercreateBean();//初始化创建用户 为什么手机号没有值
			int userId_channl2=DGUserCallService.UserCreateCall(usercreateBean2);
			//代理2
			usercreateBean2=DGUserCallService.initSellerUsercreateBean();
			int userId_agent2=DGUserCallService.UserCreateCall(usercreateBean2);
			createmchBean createmchbean2=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl2);
			GodmchManageCallService.createmchCallForChannel(createmchbean2);
			//设置vip
			GodmchManageCallService.SetVip(userId_channl2);
			
			List<Integer> mchIdList=new ArrayList();
			mchIdList.add(userId_agent);
			mchIdList.add(userId_channl2);
			bean.setMchIdList(mchIdList);
			call.setData(bean);
			call.callService();			
			
			check_verify(bean.getMchIdList());			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_getMchListByIdList_014() {
		Logger.start(true,"正例-商户id批量查询商户信息-mchIdList集合中含有普通代理,普通渠道,vip代理,vip渠道混合");
		try {
			//渠道1
			UserCreateBean usercreateBean1=DGUserCallService.initSellerUsercreateBean();
			int userId_channl=DGUserCallService.UserCreateCall(usercreateBean1);
			//代理1
			usercreateBean1=DGUserCallService.initSellerUsercreateBean();
			int userId_agent=DGUserCallService.UserCreateCall(usercreateBean1);
			createmchBean createmchbean=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl);
			GodmchManageCallService.createmchCallForChannel(createmchbean);
			//创建代理1
			List<createmchBean> createmchList=GodmchManageCallService.InitcreatemchBeanForAgent(userId_channl, userId_agent);
			GodmchManageCallService.createmchCallForAgent(createmchList.toArray(new
					createmchBean[createmchList.size()]));

			//渠道2
			UserCreateBean usercreateBean2=DGUserCallService.initSellerUsercreateBean();//初始化创建用户 为什么手机号没有值
			int userId_channl2=DGUserCallService.UserCreateCall(usercreateBean2);
			//代理2
			usercreateBean2=DGUserCallService.initSellerUsercreateBean();
			int userId_agent2=DGUserCallService.UserCreateCall(usercreateBean2);
			createmchBean createmchbean2=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl2);
			GodmchManageCallService.createmchCallForChannel(createmchbean2);
			//设置vip
			GodmchManageCallService.SetVip(userId_channl2);
			//创建代理2
			List<createmchBean> createmchList2=GodmchManageCallService.InitcreatemchBeanForAgent(userId_channl2, userId_agent2);
			GodmchManageCallService.createmchCallForAgent(createmchList2.toArray(new
					createmchBean[createmchList2.size()]));
			
			List<Integer> mchIdList=new ArrayList();
			mchIdList.add(userId_channl);
			mchIdList.add(userId_agent);
			mchIdList.add(userId_channl2);
			mchIdList.add(userId_agent2);
			bean.setMchIdList(mchIdList);
			call.setData(bean);
			call.callService();			
			check_verify(bean.getMchIdList());			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}